﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace DBMLMassager
{
	/// <summary>
	/// Interaction logic for YesNoToAllDialog.xaml
	/// </summary>
	public partial class YesNoToAllDialog : Window
	{
		public enum Results
		{
			Yes,
			YesToAll,
			No,
			NoToAll,
			Cancel
		}
		public event EventHandler SelectionMade;

		private Results result = Results.Cancel;

		public string DialogText
		{
			get
			{
				return DialogTextTB.Text;
			}
			set
			{
				DialogTextTB.Text = value;
			}
		}

		public Results Result
		{
			get
			{
				return result;
			}
		}

		public YesNoToAllDialog()
		{
			InitializeComponent();
		}

		public void RaiseSelectionMade()
		{
			if (SelectionMade != null)
			{
				SelectionMade(this, new EventArgs());
			}
		}

		private void AllBTN_Click(object sender, RoutedEventArgs e)
		{
			Button b = sender as Button;

			result = (Results)Enum.Parse(typeof(Results), b.Content.ToString());

			this.DialogResult = true;
		}

		
	}
}
